Skip to content

Conversation

@kumaradityaapril
Copy link

@kumaradityaapril kumaradityaapril commented Feb 3, 2026

  • Closes Confusing docs for pvlib.clearsky.ineichen and lookup_linke_turbidity #2598
  • I am familiar with the contributing guidelines
  • Tests added (not applicable – documentation-only change)
  • Updates entries in docs/sphinx/source/reference for API changes (not applicable)
  • Adds entries in docs/sphinx/source/whatsnew (not required for docs-only change)
  • New code is fully documented (docstrings updated with examples)
  • Pull request is nearly complete and ready for detailed review
  • Maintainer: Appropriate GitHub Labels and Milestone (maintainer action)

Description

The documentation for pvlib.clearsky.ineichen could be misleading, as it
suggested that default Linke turbidity values from SoDa are used implicitly.
In reality, these values must be explicitly obtained via
lookup_linke_turbidity and passed to ineichen.

This PR clarifies the documentation by:

  • Updating the ineichen docstring to explicitly reference
    lookup_linke_turbidity as the source of SoDa Linke turbidity values
  • Adding data provenance (SoDa) to the lookup_linke_turbidity docstring
  • Adding a short example demonstrating the two-step workflow
    (lookup_linke_turbidityineichen)

This is a documentation-only change and does not modify any functionality.

>>>
>>> tl = lookup_linke_turbidity(times, loc.latitude, loc.longitude)
>>> cs = ineichen(times, loc.latitude, loc.longitude,
... linke_turbidity=tl)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this example to the ineichen docstring. It would make more sense there.

Comment on lines 33 to 34
provided by SoDa [4]_, [5]_. Users must supply Linke turbidity values
explicitly unless providing their own turbidity data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
provided by SoDa [4]_, [5]_. Users must supply Linke turbidity values
explicitly unless providing their own turbidity data.
provided by SoDa [4]_, [5]_.

This sentence doesn't make sense to me. I suggest deleting it.


The Linke turbidity climatology used by this function is sourced from
SoDa (Solar Radiation Data) and corresponds to the references cited in
:py:func:`pvlib.clearsky.ineichen`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to include and cite those references in this docstring, instead of referencing the ineichen docstring?

@kandersolar kandersolar added this to the v0.15.1 milestone Feb 4, 2026
@kumaradityaapril
Copy link
Author

Thanks for the helpful review @kandersolar!

I've updated the PR to:

  • Move the two-step example (lookup → ineichen) into the ineichen
    docstring where it fits more naturally
  • Remove the confusing sentence about explicitly supplying turbidity values
  • Add the SoDa references directly to the lookup_linke_turbidity docstring

Please let me know if this looks good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing docs for pvlib.clearsky.ineichen and lookup_linke_turbidity

2 participants